<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Is pro spravu zapasu</title>
        <link href="<c:url value="/resources/css/default.css" />" type="text/css" rel="stylesheet" />
    <sitemesh:write property='head' /> 
</head>

<body>
    <div id="header-wrapper">
        <div id="header">
            <div id="logo">
                <h1><a href="/admin/season/season">IS </a></h1>
            </div>
            <div id="menu">
                <ul>
                    <li class="current_page_item"><a href="<c:url value="/admin/season/season" />">Seasons</a></li>
                    <li><a href="<c:url value="/admin/person/person" />">Players</a></li>
                    <li><a href="<c:url value="/admin/complaint/complaint" />">Complaints</a></li>
                </ul>
                <c:if test='<%= (!Boolean.parseBoolean(session.getAttribute("isAdmin").toString()))%>' >
                    <form:form modelAttribute="login" method="post" action="/admin/login" >
                        Username: <form:input path="username" /> Password: <form:password path="password" /> <input type="submit" value="Login" />
                    </form:form>
                </c:if>
            </div>
        </div>
    </div>
    <div id="wrapper">
        <div id="page-wrapper">
            <div id="page">
                <c:if test="${not empty error}">
                    <div class="errorblock">
                        <fmt:message key="${error}" />
                    </div>
                    <%
                        synchronized (session) {
                            session.removeAttribute("error");
                        }
                    %>
                </c:if>
                <sitemesh:write property='body' />
            </div>
        </div>
    </div>
</body>
</html>